
export default {
  namespaced: true,
  state: {
    reportId: '',
    reportName: '',
    parentName: '',
    createId: '',
    columns: [],
    userRole: '',
    phone: '',
    employeeCode: ''
  },
  mutations: {
    SET_REPORT_ID: (state, arg) => {
      state.reportId = arg
    },
    SET_REPORT_NAME: (state, arg) => {
      state.reportName = arg
    },
    SET_PARENT_NAME: (state, arg) => {
      state.parentName = arg
    },
    SET_CREATE_ID: (state, arg) => {
      state.createId = arg
    },
    SET_ARR: (state, arg) => {
      state.columns = arg
    },
    SET_USER_ROLE: (state, arg) => {
      state.userRole = arg
    },
    SET_PHONE: (state, arg) => {
      state.phone = arg
    },
    SET_EMPLOYEE_CODE: (state, arg) => {
      state.employeeCode = arg
    }

  },
  actions: {
    setReportId({ commit, state }, arg) {
      return new Promise(resolve => {
        commit('SET_REPORT_ID', arg)
        resolve(arg)
      })
    },
    setReportName({ commit, state }, arg) {
      return new Promise(resolve => {
        commit('SET_REPORT_NAME', arg)
        resolve(arg)
      })
    },
    setParentName({ commit, state }, arg) {
      return new Promise(resolve => {
        commit('SET_PARENT_NAME', arg)
        resolve(arg)
      })
    },
    setCreateId({ commit, state }, arg) {
      return new Promise(resolve => {
        commit('SET_CREATE_ID', arg)
        resolve(arg)
      })
    },
    setArr({ commit, state }, arg) {
      return new Promise(resolve => {
        commit('SET_ARR', arg)
        resolve(arg)
      })
    },
    setUserRole({ commit, state }, arg) {
      return new Promise(resolve => {
        commit('SET_USER_ROLE', arg)
        resolve(arg)
      })
    },
    setPhone({ commit, state }, arg) {
      return new Promise(resolve => {
        commit('SET_PHONE', arg)
        resolve(arg)
      })
    },
    setEmployeeCoder({ commit, state }, arg) {
      return new Promise(resolve => {
        commit('SET_EMPLOYEE_CODE', arg)
        resolve(arg)
      })
    },
    setInfo({ commit }, arg) {
      return new Promise(resolve => {

      })
    }

  }
}
